﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TestServices.Services;


namespace TestServices
{
    [TestClass]
    public class IncomeOutcome
    {
        private static readonly ServicesClient client = new ServicesClient();

        [TestMethod]
        public void TestGetUser()
        {
            int t = client.GetInt();
            String s = client.GetString();
           // Assert.AreEqual(444, t);

            User user = client.GetUser("roikatz");
       
        }

        [TestMethod]
        public void TestGetTypes()
        {
       
            var i = client.GetUserTypes();
       
        }

        [TestMethod]
        public void TestGetIncomes()
        {
            
            var incomes = client.GetIncomesForUsers("roikatz");

        }

        [TestMethod]
        public void TestGetOutcome()
        {

            var outcomes = client.GetOutcomesForUsers("roikatz");

        }
        
        [TestMethod]
        public void TestReports()
        {

            var e =  client.GetIncomesBySections("roikatz", DateTime.MinValue, DateTime.MaxValue);
            var i = client.GetOutcomesBySections("roikatz",DateTime.MinValue, DateTime.MaxValue);
        }

        [TestMethod]
        public void TestGetUserData()
        {
            User user = client.GetUserData("roikatz");
        }
        [TestMethod]
        public void TestInsertIncome()
        {
            Income income = new Income();
            income.UsersId = 1;
            income.Date = DateTime.Now;
            income.Amount = -200;
            income.Comment = string.Empty;
            income.ActionTypeId = 2;
            client.InsertIncome(income);
            
        }


        //[TestMethod]
        //public void TestInsertOutcome()
        //{

        //}
    }
}
